<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/pages/common/header.jsp"%>
<jdf:themeFile file="business/sample.js" />
</head>
<body>
	<div class="contentBody contentborder">
		<div class="tab-pane" id="tabPane">
			<div id="message">${message }</div>
			<div class="tab-page">
				 <h1 class="tab">快递发票管理</h1>
 				 <div class="contentborder">
                	 <jdf:form bean="request" scope="request">
						<form action="${dynamicDomain}/sample/page" method="post">
							 <table class="inputTable">
			                 	<tr>
									<td nowrap class="label cancelBorderLeft">
										<label for="search_EQI_customerId">客户：</label>
									</td>
									<td class="content">
									    <select name="search_EQI_customerId" >
									       <option value=""></option>
									       <jdf:selectCollection items="customers" optionText="name"/>
									    </select>
									</td>
									<td nowrap class="label">
										<label for="search_GED_sampleDate">快递日期：</label>
									</td>
									<td class="content">
										<input type="text" id="search_GED_sampleDate" size="12" name="search_GED_sampleDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'search_LED_sampleDate\')}',readOnly:true})">
										~
									    <input type="text" id="search_LED_sampleDate" size="12" name="search_LED_sampleDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'search_GED_sampleDate\')}',readOnly:true})">
									</td>
			                 	</tr>
			                 	<tr>
                                	<td class="bottomLabel" nowrap colspan="4">
                                		<div class="right">
											<button type="reset">重置</button>
											<button type="submit">查询</button>
                                		</div>
									</td>
			                 </table>
			            </form>
			        </jdf:form>
				</div>
				<div class="contentborder listArea">
					<div class="toolBar">
		 				<button type="button" onclick="window.location.href='${dynamicDomain}/sample/create'">增加</button>
					</div>
					<div id="tableDiv">
						<jdf:table items="items" var="currentRowObject" retrieveRowsCallback="limit" filterRowsCallback="limit" sortRowsCallback="limit" action="page">
							<jdf:export view="csv" fileName="采购单.csv" tooltip="Export CSV" imageName="csv" />
							<jdf:export view="xls" fileName="采购单.xls" tooltip="Export EXCEL" imageName="xls" />
							<jdf:row>
								<jdf:column property="objectId" title="编号" style="width: 20%">
								    ${currentRowObject.no}
								</jdf:column>
								<jdf:column property="customerId" title="客户" style="width: 20%">
								    <jdf:columnCollectionValue items="customers" nameProperty="name" value="${currentRowObject.customerId}"/>
								</jdf:column>
								<jdf:column property="orderId" title="订单编号" style="width: 20%">
								    ${currentRowObject.orderNo}
								</jdf:column>
								<jdf:column property="invoiceDate" title="开票日期" style="width: 20%" cell="date"/>
								<jdf:column alias="操作" sortable="false" viewsAllowed="html" style="width: 20%">
									<a href="${dynamicDomain}/sample/edit/${currentRowObject.id}?action=${action}" class="button">修改</a>
									<a href="${dynamicDomain}/sample/print/${currentRowObject.objectId}?action=${action}" class="button">查看</a>
									<a href="#selectUser" onclick="javascript:currentOrderId=${currentRowObject.objectId};getCustomer(${currentRowObject.customerId});" class="button audit edit">邮件通知</a>
								</jdf:column>
							</jdf:row>
						</jdf:table>
					</div>
				</div>
			</div>
		</div>
	</div>
	   
    <div style="display: none;">
        <div id="selectUser" class="contentborder">
            <div id="suberror"></div>
            <div id="subnotice"></div>
            <table class="inputTable">
               <tr>
                   <td class="label cancelBorderLeft" style="width: 20%;"><label>客户：</label></td>
                   <td class="content">&nbsp;<input type="checkbox" name="customer" value="1" id="customer_1" style="vertical-align: middle;">&nbsp;<label id="customer_2" for="customer_1"></label></td>
               </tr>
               <jsp:include page="/extendUser/selectEmailUsers" flush="true" />
               <tr>
                   <td class="bottomLabel" colspan="2">
                      <div class="right">
                          <button onclick="notify()" id="notifyButton">邮件通知</button>
                      </div>
                  </td>
               </tr>
            </table>
        </div>
    </div>
	<script type="text/javascript">

	    $(function() {
	        $(".colorbox").colorbox({iframe:true, innerWidth:700, innerHeight:460});
	        $('.edit').colorbox({ inline:true,innerWidth:500, innerHeight:300,href:'#selectUser'});
	    });
	
		var currentOrderId = null;
	   
	</script>
</body>
</html>